package com.rengl.service;

import com.rengl.model.User;
import com.rengl.service.impl.UserDeGradeService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "SPRINGCLOUD-PROVIDER",path = "admin/user",fallback = UserDeGradeService.class)
public interface UserService {

    @PostMapping("add")
    public void add(@RequestBody User user);


    @GetMapping("list")
    public List<User> list();
}
